package com.alm.web.controller.alm.devusepower;

import com.alm.common.core.controller.BaseController;
import com.alm.common.core.page.TableDataInfo;
import com.alm.handle.core.domain.entity.SysDevCurrentData;
import com.alm.handle.core.domain.entity.SysDevHistoryInfo;
import com.alm.handle.service.ISysDevHistoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/alm/dev/hisinfo")
public class AlmDevHisInfoController extends BaseController {

    @Autowired
    private ISysDevHistoryInfoService devHistoryInfoService;

    @PreAuthorize("@ss.hasRole('common')")
    @GetMapping("/list")
    public TableDataInfo list(SysDevHistoryInfo sysDevHistoryInfo) {
        startPage();
            List<SysDevHistoryInfo> list = devHistoryInfoService.selectDevHisList(sysDevHistoryInfo);
        return getDataTable(list);
    }

//    @PreAuthorize("@ss.hasRole('common')")
//    @GetMapping("/list")
//    public TableDataInfo getDevHistoryListByPage() {
//        startPage();
//        List<SysDevHistoryInfo> list = devHistoryInfoService.selectDevHisList();
//        return getDataTable(list);
//    }
}
